import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/treeshow',
    name: 'treeshow',
    component: () => import('../views/User/TerrShow.vue'),
    children: [

      {
        path: '/bpmnadd',
        name: 'bpmnadd',
        component: () => import('../views/BPMN/BPMN1.vue')
      },
      {
        path: '/bpmnadd2',
        name: 'bpmnadd2',
        component: () => import('../views/BPMN/BPMN2.vue')
      },
      {
        path: '/rolelist',
        name: 'rolelist',
        component: () => import('../views/Role/RoleList.vue')
      },
      {
        path: '/roleAdd',
        name: 'roleAdd',
        component: () => import('../views/Role/RoleAdd.vue')
      },
      {
        path: '/perlist',
        name: '/perlist',
        component: () => import('../views/Role/PerList.vue')
      },
      {
        path: '/roleupd',
        name: '/roleupd',
        component: () => import('../views/Role/RoleUpd.vue')
      },
      {
        path: '/peradd',
        name: '/peradd',
        component: () => import('../views/Role/PerAdd.vue')
      },

    ]
  },

]

const router = new VueRouter({
  routes
})

export default router
